let user = {
    name: "John",
    age: 30
};

for (let value of Object.values(user)) {
    alert(value);
}


let prices = {
    banana: 1,
    orange: 2,
    meat: 4,
};

// 先使用entries转换为数组，然后使用map方法，将键值对中的值翻倍，再通过fromEntries转回到对象
let doublePrices = Object.fromEntries(Object.entries(prices).map(([key, value]) => [key, value * 2]));

alert(doublePrices.meat);